
//chuc_vu
#define TABLE_FUNCTION				_T("chuc_vu")

#define FIELD_CODE_FUNCTION			_T("ma_chuc_vu")
#define FIELD_NAME_FUNCTION			_T("ten_chuc_vu")
#define FIELD_NOTE_FUNCTION			_T("ghi_chu")

//dien_thoai
#define TABLE_NAME_PHONE			_T("dien_thoai")

#define FIELD_CODE_PHONE			_T("ma_dien_thoai")
#define FIELD_CODE_PRODUCT			_T("ma_hang_hoa")
#define FIELD_GROUP_PRODUCT			_T("ma_nhom_hang")
#define FIELD_IMEI_PHONE			_T("IMEI")
#define FIELD_CODE_PROVIDE			_T("ma_nha_cung_cap")
#define FIELD_CODE_BILL_INPUT		_T("ma_phieu_nhap")
#define FIELD_PRICE_INPUT			_T("gia_nhap")
#define FIELD_PRICE_SELL			_T("gia_ban_le")
#define FIELD_PRICE_WHOLESALE		_T("gia_ban_buon")
#define FIELD_DATE_SELL_PHONE		_T("ngay_ban")
#define FIELD_NOTE_PHONE			_T("ghi_chu")
#define FIELD_BILL_OUT				_T("ma_phieu_xuat")
#define FIELD_BILL_TRANS			_T("ma_phieu_chuyen")
#define FIELD_STATUS				_T("trang_thai")

//Store manager
#define TABLE_MAN_STORE				_T("quan_ly_kho")	

#define FIELD_CODE_STORE			_T("ma_kho")
#define FIELD_NAME_STORE			_T("ten_cua_hang")
#define FIELD_ADRESS_STORE			_T("dia_chi_cua_hang")
#define FIELD_PHONE_STORE			_T("dien_thoai_cua_hang")
#define FIELD_FAX_STORE				_T("so_fax_cua_hang")
#define FIELD_CONTACT_STORE			_T("nguoi_lien_he")
#define FIELD_MOBILE_STORE			_T("di_dong")
#define FIELD_NOTE_STORE			_T("ghi_chu")
//Account
#define TABLE_NAME_TK				_T("tai_khoan")	

#define FIELD_USER					_T("ma_tai_khoan")	
#define FIELD_PASS					_T("mat_khau")	
#define FIELD_CODE_ACC				_T("ma_so_nhan_vien")	
#define FIELD_STATUS				_T("trang_thai")


//Staff
#define TABLE_NAME_STAFF			_T("nhan_vien")

#define FIELD_CODE_STAFF			_T("ma_so_nhan_vien")
#define FIELD_NAME_STAFF			_T("ho_ten")
#define FIELD_DATE_BORN_STAFF		_T("ngay_sinh")
#define FIELD_VILLAGE_STAFF			_T("que_quan")
#define FIELD_PLACE_STAFF			_T("tam_tru")
#define FIELD_ID_CARD_STAFF			_T("so_CMTNN")
#define FIELD_SALARY_STAFF			_T("muc_luong")
#define FIELD_PHONE_STAFF			_T("so_dien_thoai")
#define FIELD_EMAIL_STAFF			_T("email")
#define FIELD_FUNCTION_STAFF		_T("ma_chuc_vu")
#define FIELD_PERMISSION_STAFF		_T("cap_do_uu_tien")
#define FIELD_SEX_STAFF				_T("gioi_tinh")
#define FIELD_STORE_STAFF			_T("cua_hang")
#define FIELD_TIME_STAFF			_T("cham_cong")

//Accessory
#define TABLE_NAME_ACCESSORY		_T("phu_kien")

#define FIELD_CODE_ACCESSORY		_T("ma")
#define FIELD_COUNT_ACCESSORY		_T("so_luong")


//customer
#define TABLE_NAME_CUSTOMER			_T("khach_hang")

#define FIELD_CODE_CUSTOMER			_T("ma_khach_hang")
#define FIELD_NAME_CUSTOMER			_T("ten")
#define FIELD_ADDRESS_CUSTOMER		_T("dia_chi")
#define FIELD_PHONE_CUSTOMER		_T("so_dien_thoai")
#define FIELD_EMAIL_CUSTOMER		_T("email")
#define FIELD_BORN_CUSTOMER			_T("ngay_sinh")
#define FIELD_SEX_CUSTOMER			_T("gioi_tinh")
#define FIELD_PRODUCT_CUSTOMER		_T("ma_hang")

//provider
#define TABLE_NAME_PROVIDER			_T("nha_cung_cap")

#define FIELD_CODE_PROVIDER			_T("ma_nha_cung_cap")
#define FIELD_NAME_PROVIDER			_T("ten")
#define FIELD_ADRRESS_PROVIDER		_T("dia_chi")
#define FIELD_PHONE_PROVIDER		_T("so_dien_thoai")
#define FIELD_FAX_PROVIDER			_T("fax")
#define FIELD_NOTE_PROVIDER			_T("chu_y")

//Table bill
#define TABLE_INPUT_BILL			_T("phieu_nhap_kho")
#define TABLE_OUT_BILL				_T("phieu_xuat_kho")
#define TABLE_TRANS_BILL			_T("phieu_chuyen_kho")

#define FIELD_CODE_BILL				_T("ma_phieu")
#define FIELD_CODE_ACC_INPUT		_T("ma_nhan_vien_nhap")
#define FIELD_CODE_ACC_EDIT			_T("ma_nhan_vien_sua")
#define FIELD_CODE_TIME_INPUT		_T("thoi_gian_nhap")
#define FIELD_CODE_TIME_EDIT		_T("thoi_gian_sua")

//group table
#define TABLE_GROUP_PRODUCT			_T("nhom_hang_hoa")

#define FIELD_CODE_GROUP			_T("ma_nhom")
#define FIELD_NAME_GROUP			_T("ten_nhom")
#define FIELD_TYPE_GROUP			_T("phan_loai")

//product type
#define TABLE_LIST_PRODUCT			_T("hang_hoa")
#define FIELD_BONUS					_T("tien_thuong")

#define FIELD_MIN_COUNT				_T("toi_thieu")

//Infor company

#define TABLE_COMPANY_INF			_T("thong_tin_cong_ty")
#define FIELD_COMPANY_NAME			_T("ten_cong_ty")
#define FIELD_COMPANY_ADDRES		_T("dia_chi")
#define FIELD_COMPANY_PHONE			_T("dien_thoai")
#define FIELD_COMPANY_EMAIL			_T("email")
#define FIELD_COMPANY_NOTE			_T("ghi_chu")
#define FIELD_COMPANY_TAX			_T("ma_so_thue")

//Function in company

#define TABLE_COMPANY_FUNCTION		_T("chuc_vu")

#define FIELD_COMPANY_FUNC_CODE		_T("ma_chuc_vu")
#define FIELD_COMPANY_FUNC_NAME		_T("ten_chuc_vu")
#define FIELD_COMPANY_FUNC_NOTE		_T("ghi_chu")


enum  TABLE_POSITION
{
	TBL_FUNCTION =0,
	TBL_PHONE ,
	TBL_PRODUCT,
	TBL_CUSTOMER,
	TBL_PROVIDER,
	TBL_STAFF,
	TBL_GROUP,
	TBL_BILL_TRANS,
	TBL_BILL_INPUT,
	TBL_BILL_OUTPUT,
	TBL_ACCESSORY,
	TBL_STORE,
	TBL_ACCOUNT
};
	

enum  COLUMN_INDEX_PHONE
{
	COUNT_ROW = 0,
	TYPE_PRODUCT,
	CODE_PRODUCT,
	CODE_IMEI,
	NAME_PRODUCT,
	CODE_PROVIDE, 
	STORE_CODE,
	PRICE_INPUT,
	PRICE_SELL,
	PRICE_WHOLE,
	NUMBER_PRODUCT,
	STATUS_PRODUCT
};

